import java.util.Scanner;
public class Test4 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNextDouble()) {
			double x = scanner.nextDouble();
			if (x >= 0) {	
				double a = -1, b = Math.max(1, x);
				double mid = (a + b) / 2;
				for (;;) {
					if (Math.abs(mid * mid - x) < 0.0001) {
						System.out.printf("%.5f\n", mid);
						break;
					}
					if (mid * mid < x)
						a = mid;
					else
						b = mid;
					mid = (a + b) / 2;
				}
				
			}
			else
				System.out.println(Double.NaN);
		}
		scanner.close();
	}
}